package com.chmingx.crud;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;

import java.util.Map;

@MapperScan("com.chmingx.crud.mapper")
@SpringBootApplication
public class Boot05CrudApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(Boot05CrudApplication.class, args);

        ConfigurableEnvironment environment = run.getEnvironment();
        Map<String, Object> systemEnvironment = environment.getSystemEnvironment(); // 获取系统环境变量
        Map<String, Object> systemProperties = environment.getSystemProperties(); // 获取系统配置
        System.out.println(systemEnvironment);
        System.out.println(systemProperties);
    }

}
